package com.ruoyi.swla2.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.swla2.mapper.GisLayerMapper;
import com.ruoyi.swla2.domain.GisLayer;
import com.ruoyi.swla2.service.IGisLayerService;

/**
 * GIS管网-图层Service业务层处理
 * 
 * @author gdqt
 * @date 2023-11-26
 */
@Service
public class GisLayerServiceImpl implements IGisLayerService 
{
    @Autowired
    private GisLayerMapper gisLayerMapper;

    /**
     * 查询GIS管网-图层
     * 
     * @param id GIS管网-图层主键
     * @return GIS管网-图层
     */
    @Override
    public GisLayer selectGisLayerById(Long id)
    {
        return gisLayerMapper.selectGisLayerById(id);
    }

    /**
     * 查询GIS管网-图层列表
     * 
     * @param gisLayer GIS管网-图层
     * @return GIS管网-图层
     */
    @Override
    public List<GisLayer> selectGisLayerList(GisLayer gisLayer)
    {
        return gisLayerMapper.selectGisLayerList(gisLayer);
    }

    /**
     * 新增GIS管网-图层
     * 
     * @param gisLayer GIS管网-图层
     * @return 结果
     */
    @Override
    public int insertGisLayer(GisLayer gisLayer)
    {
        gisLayer.setCreateTime(DateUtils.getNowDate());
        return gisLayerMapper.insertGisLayer(gisLayer);
    }

    /**
     * 修改GIS管网-图层
     * 
     * @param gisLayer GIS管网-图层
     * @return 结果
     */
    @Override
    public int updateGisLayer(GisLayer gisLayer)
    {
        gisLayer.setUpdateTime(DateUtils.getNowDate());
        return gisLayerMapper.updateGisLayer(gisLayer);
    }

    /**
     * 批量删除GIS管网-图层
     * 
     * @param ids 需要删除的GIS管网-图层主键
     * @return 结果
     */
    @Override
    public int deleteGisLayerByIds(Long[] ids)
    {
        return gisLayerMapper.deleteGisLayerByIds(ids);
    }

    /**
     * 删除GIS管网-图层信息
     * 
     * @param id GIS管网-图层主键
     * @return 结果
     */
    @Override
    public int deleteGisLayerById(Long id)
    {
        return gisLayerMapper.deleteGisLayerById(id);
    }
}
